package com.kingboy.kbg.uums.center.shiro;

import org.apache.shiro.SecurityUtils;

/**
 * Create By 郭金宝 on 2018/6/19.<br>
 */
public class PrincipalUtils {

    public static ShiroPrincipal getAccount() {
        if (SecurityUtils.getSubject() == null) {
            return new ShiroPrincipal();
        }
        return (ShiroPrincipal) SecurityUtils.getSubject().getPrincipal();
    }
}
